home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / T2WIN-32.ZIP / _STRING.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-01  |  87.7 KB  |  2,073 lines

  1. VERSION 4.00
  2. Begin VB.Form frmString 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "String"
  5.    ClientHeight    =   5235
  6.    ClientLeft      =   330
  7.    ClientTop       =   2385
  8.    ClientWidth     =   9765
  9.    Height          =   5640
  10.    Left            =   270
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   9765
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2040
  17.    Width           =   9885
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   8
  27.       Top             =   630
  28.       Width           =   9555
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   9765
  37.       _Version        =   65536
  38.       _ExtentX        =   17224
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   1
  47.          Top             =   75
  48.          Width           =   7170
  49.       End
  50.       Begin Threed.SSCommand cmdNP 
  51.          Height          =   300
  52.          Index           =   1
  53.          Left            =   9435
  54.          TabIndex        =   10
  55.          Top             =   90
  56.          Width           =   255
  57.          _Version        =   65536
  58.          _ExtentX        =   450
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   ">"
  62.          BevelWidth      =   1
  63.          Font3D          =   3
  64.          RoundedCorners  =   0   'False
  65.          Outline         =   0   'False
  66.       End
  67.       Begin Threed.SSCommand cmdNP 
  68.          Height          =   300
  69.          Index           =   0
  70.          Left            =   8595
  71.          TabIndex        =   9
  72.          Top             =   90
  73.          Width           =   255
  74.          _Version        =   65536
  75.          _ExtentX        =   450
  76.          _ExtentY        =   529
  77.          _StockProps     =   78
  78.          Caption         =   "<"
  79.          BevelWidth      =   1
  80.          Font3D          =   3
  81.          RoundedCorners  =   0   'False
  82.          Outline         =   0   'False
  83.       End
  84.       Begin VB.Label Label2 
  85.          Caption         =   "&Select a function"
  86.          Height          =   255
  87.          Left            =   90
  88.          TabIndex        =   3
  89.          Top             =   120
  90.          Width           =   1275
  91.       End
  92.       Begin Threed.SSCommand SSCommand1 
  93.          Default         =   -1  'True
  94.          Height          =   300
  95.          Left            =   8910
  96.          TabIndex        =   2
  97.          Top             =   90
  98.          Width           =   465
  99.          _Version        =   65536
  100.          _ExtentX        =   820
  101.          _ExtentY        =   529
  102.          _StockProps     =   78
  103.          Caption         =   "&Go"
  104.          BevelWidth      =   1
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109.    Begin Threed.SSPanel SSPanel2 
  110.       Align           =   2  'Align Bottom
  111.       Height          =   465
  112.       Left            =   0
  113.       TabIndex        =   4
  114.       Top             =   4770
  115.       Width           =   9765
  116.       _Version        =   65536
  117.       _ExtentX        =   17224
  118.       _ExtentY        =   820
  119.       _StockProps     =   15
  120.       BackColor       =   12632256
  121.       Begin VB.TextBox Text1 
  122.          Height          =   285
  123.          Left            =   1440
  124.          TabIndex        =   6
  125.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  126.          Top             =   90
  127.          Width           =   7350
  128.       End
  129.       Begin Threed.SSCommand SSCommand2 
  130.          Height          =   285
  131.          Left            =   8865
  132.          TabIndex        =   7
  133.          Top             =   90
  134.          Width           =   825
  135.          _Version        =   65536
  136.          _ExtentX        =   1455
  137.          _ExtentY        =   503
  138.          _StockProps     =   78
  139.          Caption         =   "&Reset"
  140.          BevelWidth      =   1
  141.          Outline         =   0   'False
  142.       End
  143.       Begin VB.Label Label1 
  144.          Caption         =   "&Enter a test string"
  145.          Height          =   255
  146.          Left            =   90
  147.          TabIndex        =   5
  148.          Top             =   120
  149.          Width           =   1275
  150.       End
  151.    End
  152. Attribute VB_Name = "frmString"
  153. Attribute VB_Creatable = False
  154. Attribute VB_Exposed = False
  155. Option Explicit
  156. Option Base 1
  157. Private Const Iteration = 250
  158. Dim IsLoaded         As Integer
  159. Dim TimerStartOk     As Integer
  160. Dim TimerCloseOk     As Integer
  161. Dim TimerHandle      As Integer
  162. Dim TimerValue       As Long
  163. Private Sub cmdNP_Click(Index As Integer)
  164.    Call sub_NextPrev(cmb_Function, Index)
  165. End Sub
  166. Private Sub cmb_Function_Click()
  167.    If (IsLoaded = False) Then Exit Sub
  168.    Call cDisableFI(mdiT2W.Picture1)
  169.    SSPanel2.Visible = True
  170.    txt_Result = ""
  171.    DoEvents
  172.    Select Case cmb_Function.ListIndex
  173.       Case 0
  174.          Call TestOneCharFromLeft
  175.       Case 1
  176.          Call TestOneCharFromRight
  177.       Case 2
  178.          Call TestBlockCharFromLeft
  179.       Case 3
  180.          Call TestBlockCharFromRight
  181.       Case 4
  182.          Call TestGetIn
  183.       Case 5
  184.          Call TestGetInR
  185.       Case 6
  186.          Call TestGetInPart
  187.       Case 7
  188.          Call TestGetInPartR
  189.       Case 8
  190.          Call TestGetBlock
  191.       Case 9
  192.          Call TestInsertChars
  193.       Case 10
  194.          Call TestInsertByMask
  195.       Case 11
  196.          Call TestInsertBlocks
  197.       Case 12
  198.          Call TestInsertBlocksBy
  199.       Case 13
  200.          Call TestRemoveOneChar
  201.       Case 14
  202.          Call TestRemoveBlockChar
  203.       Case 15
  204.          Call TestTokenIn
  205.       Case 16
  206.          SSPanel2.Visible = False
  207.          Call TestOrTokenX
  208.       Case 17
  209.          SSPanel2.Visible = False
  210.          Call TestAndTokenX
  211.       Case 18
  212.          Call TestReverse
  213.       Case 19
  214.          Call TestMixChars
  215.       Case 20
  216.          Call TestScrollX
  217.       Case 21
  218.          Call TestChangeChars
  219.       Case 22
  220.          Call TestChangeCharsUntil
  221.       Case 23
  222.          Call TestCheckChars
  223.       Case 24
  224.          Call TestFilterChars
  225.       Case 25
  226.          Call TestFilterNotChars
  227.       Case 26
  228.          Call TestFilterBlocks
  229.       Case 27
  230.          Call TestResizeString
  231.       Case 28
  232.          Call TestResizeStringAndFill
  233.       Case 29
  234.          Call TestCreateAndFill
  235.       Case 30
  236.          Call TestFill
  237.       Case 31
  238.          Call TestLrc
  239.       Case 32
  240.          Call TestCompress
  241.       Case 33
  242.          SSPanel2.Visible = False
  243.          Call TestCompressTab
  244.       Case 34
  245.          Call TestCompact
  246.       Case 35
  247.          Call TestAlign
  248.       Case 36
  249.          Call TestProperName
  250.       Case 37
  251.          Call TestProperName2
  252.       Case 38
  253.          Call TestStringSAR
  254.       Case 39
  255.          Call TestToHexa
  256.       Case 40
  257.          SSPanel2.Visible = False
  258.          Call TestRomanArabic
  259.       Case 41
  260.          Call TestAsciiEbcdic
  261.       Case 42
  262.          SSPanel2.Visible = False
  263.          Call TestPatternMatch
  264.       Case 43
  265.          SSPanel2.Visible = False
  266.          Call TestPatternExtMatch
  267.       Case 44
  268.          Call TestCheckNumericity
  269.       Case 45
  270.          Call TestAlphaDigit
  271.       Case 46
  272.          SSPanel2.Visible = False
  273.          Call TestH2X
  274.       Case 47
  275.          Call TestSortStr
  276.       Case 48
  277.          Call TestMorse
  278.       Case 49
  279.          Call TestToZ9
  280.    End Select
  281.    DoEvents
  282.    Call cEnableFI(mdiT2W.Picture1)
  283. End Sub
  284. Private Sub Form_Activate()
  285.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  286. End Sub
  287. Private Sub Form_Load()
  288.    IsLoaded = False
  289.    Show
  290.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  291.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  292.    IsLoaded = True
  293. End Sub
  294. Private Sub SSCommand1_Click()
  295.    Call cmb_Function_Click
  296. End Sub
  297. Private Sub TestOneCharFromLeft()
  298.    Dim intResult        As Integer
  299.    Dim strResult        As String
  300.    Dim strDisplay       As String
  301.    Dim i                As Integer
  302.    Dim Str1             As String
  303.    intResult = 0
  304.    strResult = ""
  305.    strDisplay = ""
  306.      
  307.    Str1 = Text1.Text
  308.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  309.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  310.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  311.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  312.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  313.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  314.    txt_Result = strDisplay
  315.    'time the function
  316.    TimerHandle = cTimerOpen()
  317.    TimerStartOk = cTimerStart(TimerHandle)
  318.    For i = 1 To Iteration
  319.       strResult = cOneCharFromLeft(Str1, 3)
  320.    Next i
  321.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  322.    TimerCloseOk = cTimerClose(TimerHandle)
  323. End Sub
  324. Private Sub SSCommand2_Click()
  325.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  326.    Call SSCommand1_Click
  327. End Sub
  328. Private Sub TestOneCharFromRight()
  329.    Dim intResult        As Integer
  330.    Dim strResult        As String
  331.    Dim strDisplay       As String
  332.    Dim i                As Integer
  333.    Dim Str1             As String
  334.    intResult = 0
  335.    strResult = ""
  336.    strDisplay = ""
  337.      
  338.    Str1 = Text1.Text
  339.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  340.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  341.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  342.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  343.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  344.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  345.    txt_Result = strDisplay
  346.    'time the function
  347.    TimerHandle = cTimerOpen()
  348.    TimerStartOk = cTimerStart(TimerHandle)
  349.    For i = 1 To Iteration
  350.       strResult = cOneCharFromRight(Str1, 3)
  351.    Next i
  352.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  353.    TimerCloseOk = cTimerClose(TimerHandle)
  354. End Sub
  355. Private Sub TestBlockCharFromLeft()
  356.    Dim intResult        As Integer
  357.    Dim strResult        As String
  358.    Dim strDisplay       As String
  359.    Dim i                As Integer
  360.    Dim Str1             As String
  361.    intResult = 0
  362.    strResult = ""
  363.    strDisplay = ""
  364.      
  365.    Str1 = Text1.Text
  366.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  367.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  368.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  369.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  370.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  371.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  372.    txt_Result = strDisplay
  373.    'time the function
  374.    TimerHandle = cTimerOpen()
  375.    TimerStartOk = cTimerStart(TimerHandle)
  376.    For i = 1 To Iteration
  377.       strResult = cBlockCharFromLeft(Str1, 3)
  378.    Next i
  379.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  380.    TimerCloseOk = cTimerClose(TimerHandle)
  381. End Sub
  382. Private Sub TestBlockCharFromRight()
  383.    Dim intResult        As Integer
  384.    Dim strResult        As String
  385.    Dim strDisplay       As String
  386.    Dim i                As Integer
  387.    Dim Str1             As String
  388.    intResult = 0
  389.    strResult = ""
  390.    strDisplay = ""
  391.      
  392.    Str1 = Text1.Text
  393.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  394.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  395.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  396.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  397.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  398.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  399.    txt_Result = strDisplay
  400.    'time the function
  401.    TimerHandle = cTimerOpen()
  402.    TimerStartOk = cTimerStart(TimerHandle)
  403.    For i = 1 To Iteration
  404.       strResult = cBlockCharFromRight(Str1, 3)
  405.    Next i
  406.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  407.    TimerCloseOk = cTimerClose(TimerHandle)
  408. End Sub
  409. Private Sub TestGetIn()
  410.    Dim intResult        As Integer
  411.    Dim strResult        As String
  412.    Dim strDisplay       As String
  413.    Dim i                As Integer
  414.    Dim Str1             As String
  415.    Dim Sep1             As String
  416.    intResult = 0
  417.    strResult = ""
  418.    strDisplay = ""
  419.      
  420.    Str1 = Text1.Text
  421.    Sep1 = "/"
  422.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  423.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  424.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  425.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  426.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  427.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  428.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  429.    Sep1 = "G"
  430.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  431.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  432.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  433.    Sep1 = "g"
  434.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  435.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  436.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  437.    txt_Result = strDisplay
  438.    'time the function
  439.    TimerHandle = cTimerOpen()
  440.    TimerStartOk = cTimerStart(TimerHandle)
  441.    For i = 1 To Iteration
  442.       strResult = cGetIn(Str1, Sep1, 3)
  443.    Next i
  444.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  445.    TimerCloseOk = cTimerClose(TimerHandle)
  446. End Sub
  447. Private Sub TestGetInR()
  448.    Dim intResult        As Integer
  449.    Dim strResult        As String
  450.    Dim strDisplay       As String
  451.    Dim i                As Integer
  452.    Dim Str1             As String
  453.    Dim Sep1             As String
  454.    intResult = 0
  455.    strResult = ""
  456.    strDisplay = ""
  457.      
  458.    Str1 = Text1.Text
  459.    Sep1 = "/"
  460.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  461.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  462.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  463.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  464.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  465.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  466.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  467.    Sep1 = "G"
  468.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  469.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  470.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  471.    Sep1 = "g"
  472.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  473.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  474.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  475.    txt_Result = strDisplay
  476.    'time the function
  477.    TimerHandle = cTimerOpen()
  478.    TimerStartOk = cTimerStart(TimerHandle)
  479.    For i = 1 To Iteration
  480.       strResult = cGetInR(Str1, Sep1, 3)
  481.    Next i
  482.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  483.    TimerCloseOk = cTimerClose(TimerHandle)
  484. End Sub
  485. Private Sub TestGetInPart()
  486.    Dim intResult        As Integer
  487.    Dim strResult        As String
  488.    Dim strDisplay       As String
  489.    Dim i                As Integer
  490.    Dim Str1             As String
  491.    Dim Sep1             As String
  492.    intResult = 0
  493.    strResult = ""
  494.    strDisplay = ""
  495.      
  496.    Str1 = Text1.Text
  497.    Sep1 = "/"
  498.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  499.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  500.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  501.    Sep1 = "G"
  502.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  503.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  504.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  505.    Sep1 = "g"
  506.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  507.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  508.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  509.    txt_Result = strDisplay
  510.    'time the function
  511.    TimerHandle = cTimerOpen()
  512.    TimerStartOk = cTimerStart(TimerHandle)
  513.    For i = 1 To Iteration
  514.       strResult = cGetInPart(Str1, Sep1, True)
  515.    Next i
  516.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  517.    TimerCloseOk = cTimerClose(TimerHandle)
  518. End Sub
  519. Private Sub TestGetInPartR()
  520.    Dim intResult        As Integer
  521.    Dim strResult        As String
  522.    Dim strDisplay       As String
  523.    Dim i                As Integer
  524.    Dim Str1             As String
  525.    Dim Sep1             As String
  526.    intResult = 0
  527.    strResult = ""
  528.    strDisplay = ""
  529.      
  530.    Str1 = Text1.Text
  531.    Sep1 = "/"
  532.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  533.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  534.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  535.    Sep1 = "G"
  536.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  537.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  538.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  539.    Sep1 = "g"
  540.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  541.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  542.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  543.    txt_Result = strDisplay
  544.    'time the function
  545.    TimerHandle = cTimerOpen()
  546.    TimerStartOk = cTimerStart(TimerHandle)
  547.    For i = 1 To Iteration
  548.       strResult = cGetInPartR(Str1, Sep1, True)
  549.    Next i
  550.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  551.    TimerCloseOk = cTimerClose(TimerHandle)
  552. End Sub
  553. Private Sub TestGetBlock()
  554.    Dim intResult        As Integer
  555.    Dim strResult        As String
  556.    Dim strDisplay       As String
  557.    Dim i                As Integer
  558.    Dim Str1             As String
  559.    Dim BlockSize        As Integer
  560.    intResult = 0
  561.    strResult = ""
  562.    strDisplay = ""
  563.      
  564.    Str1 = Text1.Text
  565.    BlockSize = 2
  566.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  567.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  568.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  569.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  570.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  571.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  572.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  573.    BlockSize = 3
  574.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  575.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  576.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  577.    BlockSize = 4
  578.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  579.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  580.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  581.    txt_Result = strDisplay
  582.    'time the function
  583.    TimerHandle = cTimerOpen()
  584.    TimerStartOk = cTimerStart(TimerHandle)
  585.    For i = 1 To Iteration
  586.       strResult = cGetBlock(Str1, BlockSize, 3)
  587.    Next i
  588.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  589.    TimerCloseOk = cTimerClose(TimerHandle)
  590. End Sub
  591. Private Sub TestInsertChars()
  592.    Dim intResult        As Integer
  593.    Dim strResult        As String
  594.    Dim strDisplay       As String
  595.    Dim i                As Integer
  596.    Dim Str1             As String
  597.    intResult = 0
  598.    strResult = ""
  599.    strDisplay = ""
  600.      
  601.    Str1 = Text1.Text
  602.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  603.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  604.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  605.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  606.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  607.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  608.    txt_Result = strDisplay
  609.    'time the function
  610.    TimerHandle = cTimerOpen()
  611.    TimerStartOk = cTimerStart(TimerHandle)
  612.    For i = 1 To Iteration
  613.       strResult = cInsertChars(Str1, 1, "a")
  614.    Next i
  615.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  616.    TimerCloseOk = cTimerClose(TimerHandle)
  617. End Sub
  618. Private Sub TestInsertByMask()
  619.    Dim intResult        As Integer
  620.    Dim strResult        As String
  621.    Dim strDisplay       As String
  622.    Dim i                As Integer
  623.    Dim Str1             As String
  624.    Dim Str2             As String
  625.    Dim Mask1            As String
  626.    intResult = 0
  627.    strResult = ""
  628.    strDisplay = ""
  629.      
  630.    Str1 = "Nr ## Price $###.##"
  631.    Str2 = "0705200"
  632.    Mask1 = "#"
  633.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  634.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  635.    Str1 = Text1.Text
  636.    Str2 = String(cCount(Str1, "/"), "*")
  637.    Mask1 = "/"
  638.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  639.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  640.    txt_Result = strDisplay
  641.    'time the function
  642.    TimerHandle = cTimerOpen()
  643.    TimerStartOk = cTimerStart(TimerHandle)
  644.    For i = 1 To Iteration
  645.       strResult = cInsertByMask(Str1, Mask1, Str2)
  646.    Next i
  647.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  648.    TimerCloseOk = cTimerClose(TimerHandle)
  649. End Sub
  650. Private Sub TestInsertBlocks()
  651.    Dim intResult        As Integer
  652.    Dim strResult        As String
  653.    Dim strDisplay       As String
  654.    Dim i                As Integer
  655.    Dim Str1             As String
  656.    Dim Str2             As String
  657.    intResult = 0
  658.    strResult = ""
  659.    strDisplay = ""
  660.      
  661.    Str1 = "A~BC~DEF~GHIJ~"
  662.    Str2 = "a~bc~def~ghij"
  663.    strDisplay = strDisplay + "Insert (InsertBlocks) '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  664.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  665.    Str1 = "A~BC~DEF~GHIJ~"
  666.    Str2 = ""
  667.    strDisplay = strDisplay + "Insert (InsertBlocks) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  668.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  669.    Str1 = "A~BC~DEF~GHIJ~"
  670.    Str2 = ""
  671.    strDisplay = strDisplay + "Insert (InsertBlocksExt) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  672.    strDisplay = strDisplay & cInsertBlocksExt(Str1, Str2) & vbCrLf & vbCrLf
  673.    txt_Result = strDisplay
  674.    'time the function
  675.    TimerHandle = cTimerOpen()
  676.    TimerStartOk = cTimerStart(TimerHandle)
  677.    For i = 1 To Iteration
  678.       strResult = cInsertBlocks(Str1, Str2)
  679.    Next i
  680.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  681.    TimerCloseOk = cTimerClose(TimerHandle)
  682. End Sub
  683. Public Sub TestInsertBlocksBy()
  684.    Dim intResult        As Integer
  685.    Dim strResult        As String
  686.    Dim strDisplay       As String
  687.    Dim i                As Integer
  688.    Dim Str1             As String
  689.    Dim Str2             As String
  690.    Dim Sep1             As String
  691.    intResult = 0
  692.    strResult = ""
  693.    strDisplay = ""
  694.      
  695.    Str1 = Text1.Text
  696.    Str2 = "a/bc/def/ghij"
  697.    Sep1 = "/"
  698.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  699.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  700.    Str1 = Text1.Text
  701.    Str2 = ""
  702.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  703.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  704.    txt_Result = strDisplay
  705.    'time the function
  706.    TimerHandle = cTimerOpen()
  707.    TimerStartOk = cTimerStart(TimerHandle)
  708.    For i = 1 To Iteration
  709.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  710.    Next i
  711.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  712.    TimerCloseOk = cTimerClose(TimerHandle)
  713. End Sub
  714. Private Sub TestRemoveOneChar()
  715.    Dim intResult        As Integer
  716.    Dim strResult        As String
  717.    Dim strDisplay       As String
  718.    Dim i                As Integer
  719.    Dim Str1             As String
  720.    intResult = 0
  721.    strResult = ""
  722.    strDisplay = ""
  723.      
  724.    Str1 = Text1.Text
  725.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  726.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  727.    Str1 = Text1.Text
  728.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  729.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  730.    Str1 = Text1.Text
  731.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  732.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  733.    Str1 = Text1.Text
  734.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  735.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  736.    Str1 = Text1.Text
  737.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  738.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  739.    txt_Result = strDisplay
  740.    'time the function
  741.    Str1 = Text1.Text
  742.    TimerHandle = cTimerOpen()
  743.    TimerStartOk = cTimerStart(TimerHandle)
  744.    For i = 1 To Iteration
  745.       strResult = cRemoveOneChar(Str1, 7)
  746.    Next i
  747.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  748.    TimerCloseOk = cTimerClose(TimerHandle)
  749. End Sub
  750. Public Sub TestRemoveBlockChar()
  751.    Dim intResult        As Integer
  752.    Dim strResult        As String
  753.    Dim strDisplay       As String
  754.    Dim i                As Integer
  755.    Dim Str1             As String
  756.    intResult = 0
  757.    strResult = ""
  758.    strDisplay = ""
  759.      
  760.    Str1 = Text1.Text
  761.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  762.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  763.    Str1 = Text1.Text
  764.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  765.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  766.    Str1 = Text1.Text
  767.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  768.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  769.    Str1 = Text1.Text
  770.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  771.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  772.    Str1 = Text1.Text
  773.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  774.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  775.    txt_Result = strDisplay
  776.    'time the function
  777.    Str1 = Text1.Text
  778.    TimerHandle = cTimerOpen()
  779.    TimerStartOk = cTimerStart(TimerHandle)
  780.    For i = 1 To Iteration
  781.       strResult = cRemoveBlockChar(Str1, 1, 1)
  782.    Next i
  783.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  784.    TimerCloseOk = cTimerClose(TimerHandle)
  785. End Sub
  786. Private Sub TestTokenIn()
  787.    Dim intResult        As Integer
  788.    Dim strResult        As String
  789.    Dim strDisplay       As String
  790.    Dim i                As Integer
  791.    Dim Str1             As String
  792.    Dim Sep1             As String
  793.    intResult = 0
  794.    strResult = ""
  795.    strDisplay = ""
  796.      
  797.    Str1 = Text1.Text
  798.    Sep1 = "/HM"
  799.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  800.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  801.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  802.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  803.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  804.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  805.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  806.    Sep1 = "G"
  807.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  808.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  809.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  810.    Sep1 = "g"
  811.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  812.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  813.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  814.    txt_Result = strDisplay
  815.    'time the function
  816.    TimerHandle = cTimerOpen()
  817.    TimerStartOk = cTimerStart(TimerHandle)
  818.    For i = 1 To Iteration
  819.       strResult = cTokenIn(Str1, Sep1, 3)
  820.    Next i
  821.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  822.    TimerCloseOk = cTimerClose(TimerHandle)
  823. End Sub
  824. Private Sub TestOrTokenX()
  825.    Dim intResult        As Integer
  826.    Dim strResult        As String
  827.    Dim strDisplay       As String
  828.    Dim i                As Integer
  829.    Dim Str1             As String
  830.    Dim Str2             As String
  831.    Dim Sep1             As String
  832.    intResult = 0
  833.    strResult = ""
  834.    strDisplay = ""
  835.    Sep1 = "\"
  836.      
  837.    Str1 = "FOX|OVER|THE"
  838.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  839.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  840.    Str1 = "quick|jumps|the"
  841.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  842.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  843.    Str1 = "FOX\OVER\THE"
  844.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  845.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  846.    Str1 = "quick\jumps\the"
  847.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  848.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  849.    Str1 = "FOX/OVER/THE"
  850.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  851.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  852.    Str1 = "quick\JUMPS\the"
  853.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  854.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  855.    Str1 = LCase$("quick\jumps\THE")
  856.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  857.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  858.    txt_Result = strDisplay
  859.    'time the function
  860.    TimerHandle = cTimerOpen()
  861.    TimerStartOk = cTimerStart(TimerHandle)
  862.    For i = 1 To Iteration
  863.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  864.    Next i
  865.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  866.    TimerCloseOk = cTimerClose(TimerHandle)
  867. End Sub
  868. Private Sub TestAndTokenX()
  869.    Dim intResult        As Integer
  870.    Dim strResult        As String
  871.    Dim strDisplay       As String
  872.    Dim i                As Integer
  873.    Dim Str1             As String
  874.    Dim Str2             As String
  875.    Dim Sep1             As String
  876.    intResult = 0
  877.    strResult = ""
  878.    strDisplay = ""
  879.      
  880.    Sep1 = "\"
  881.      
  882.    Str1 = "FOX|OVER|THE"
  883.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  884.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  885.    Str1 = "quick|jumps|the"
  886.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  887.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  888.    Str1 = "FOX\OVER\THE"
  889.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  890.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  891.    Str1 = "quick\jumps\the"
  892.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  893.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  894.    Str1 = "FOX/OVER/THE"
  895.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  896.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  897.    Str1 = "quick\JUMPS\the"
  898.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  899.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  900.    Str1 = LCase$("quick\jumps\THE")
  901.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  902.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  903.    txt_Result = strDisplay
  904.    'time the function
  905.    TimerHandle = cTimerOpen()
  906.    TimerStartOk = cTimerStart(TimerHandle)
  907.    For i = 1 To Iteration
  908.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  909.    Next i
  910.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  911.    TimerCloseOk = cTimerClose(TimerHandle)
  912. End Sub
  913. Private Sub TestReverse()
  914.    Dim intResult        As Integer
  915.    Dim strResult        As String
  916.    Dim strDisplay       As String
  917.    Dim i                As Integer
  918.    Dim Str1             As String
  919.    Dim Str2             As String
  920.    intResult = 0
  921.    strResult = ""
  922.    strDisplay = ""
  923.      
  924.    Str1 = Text1.Text
  925.    Str2 = cReverse(Str1)
  926.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  927.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  928.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  929.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  930.    txt_Result = strDisplay
  931.    'time the function
  932.    TimerHandle = cTimerOpen()
  933.    TimerStartOk = cTimerStart(TimerHandle)
  934.    For i = 1 To Iteration
  935.       strResult = cReverse(Str1)
  936.    Next i
  937.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  938.    TimerCloseOk = cTimerClose(TimerHandle)
  939. End Sub
  940. Private Sub TestMixChars()
  941.    Dim intResult        As Integer
  942.    Dim strResult        As String
  943.    Dim strDisplay       As String
  944.    Dim i                As Integer
  945.    Dim Str1             As String
  946.    Dim Str2             As String
  947.    intResult = 0
  948.    strResult = ""
  949.    strDisplay = ""
  950.      
  951.    Str1 = Text1.Text
  952.    Str2 = cMixChars(Str1)
  953.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  954.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  955.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  956.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  957.    Str1 = "TIME TO WIN (32-Bit)"
  958.    Str2 = cMixChars(Str1)
  959.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  960.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  961.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  962.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  963.    Str1 = "Under the sky, the sun lights"
  964.    Str2 = cMixChars(Str1)
  965.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  966.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  967.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  968.    strDisplay = strDisplay & cMixChars(Str2)
  969.    txt_Result = strDisplay
  970.    'time the function
  971.    TimerHandle = cTimerOpen()
  972.    TimerStartOk = cTimerStart(TimerHandle)
  973.    For i = 1 To Iteration
  974.       strResult = cMixChars(Str1)
  975.    Next i
  976.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  977.    TimerCloseOk = cTimerClose(TimerHandle)
  978. End Sub
  979. Private Sub TestScrollX()
  980.    Dim intResult        As Integer
  981.    Dim strResult        As String
  982.    Dim strDisplay       As String
  983.    Dim i                As Integer
  984.    Dim Str1             As String
  985.    Dim Str2             As String
  986.    intResult = 0
  987.    strResult = ""
  988.    strDisplay = ""
  989.      
  990.    Str1 = Text1.Text
  991.    Str2 = Text1.Text
  992.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  993.    For i = 1 To 7
  994.       Str2 = cScrollL(Str2)
  995.       strDisplay = strDisplay & Str2 & vbCrLf
  996.    Next i
  997.    strDisplay = strDisplay & vbCrLf
  998.    Str1 = Text1.Text
  999.    Str2 = Text1.Text
  1000.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1001.    For i = 1 To 7
  1002.       Str2 = cScrollR(Str2)
  1003.       strDisplay = strDisplay & Str2 & vbCrLf
  1004.    Next i
  1005.    strDisplay = strDisplay & vbCrLf
  1006.    txt_Result = strDisplay
  1007.    'time the function
  1008.    TimerHandle = cTimerOpen()
  1009.    TimerStartOk = cTimerStart(TimerHandle)
  1010.    For i = 1 To Iteration
  1011.       strResult = cScrollL(Str1)
  1012.    Next i
  1013.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1014.    TimerCloseOk = cTimerClose(TimerHandle)
  1015. End Sub
  1016. Private Sub TestChangeChars()
  1017.    Dim intResult        As Integer
  1018.    Dim strResult        As String
  1019.    Dim strDisplay       As String
  1020.    Dim i                As Integer
  1021.    Dim Str1             As String
  1022.    intResult = 0
  1023.    strResult = ""
  1024.    strDisplay = ""
  1025.      
  1026.    Str1 = Text1.Text
  1027.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1028.    Call cChangeChars(Str1, "AZM", "qyc")
  1029.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1030.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1031.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1032.    Call cChangeChars(Str1, "AZM", "qyc")
  1033.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1034.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1035.    Call cChangeChars(Str1, "qyc", "+-*")
  1036.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1037.    txt_Result = strDisplay
  1038.    'time the function
  1039.    Str1 = Text1.Text
  1040.    TimerHandle = cTimerOpen()
  1041.    TimerStartOk = cTimerStart(TimerHandle)
  1042.    For i = 1 To Iteration
  1043.       Call cChangeChars(Str1, "AZM", "qyc")
  1044.    Next i
  1045.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1046.    TimerCloseOk = cTimerClose(TimerHandle)
  1047. End Sub
  1048. Private Sub TestChangeCharsUntil()
  1049.    Dim intResult        As Integer
  1050.    Dim strResult        As String
  1051.    Dim strDisplay       As String
  1052.    Dim i                As Integer
  1053.    Dim Str1             As String
  1054.    intResult = 0
  1055.    strResult = ""
  1056.    strDisplay = ""
  1057.      
  1058.    Str1 = Text1.Text
  1059.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1060.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1061.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1062.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1063.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1064.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1065.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1066.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1067.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1068.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1069.    txt_Result = strDisplay
  1070.    'time the function
  1071.    Str1 = Text1.Text
  1072.    TimerHandle = cTimerOpen()
  1073.    TimerStartOk = cTimerStart(TimerHandle)
  1074.    For i = 1 To Iteration
  1075.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1076.    Next i
  1077.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1078.    TimerCloseOk = cTimerClose(TimerHandle)
  1079. End Sub
  1080. Private Sub TestCheckChars()
  1081.    Dim intResult        As Integer
  1082.    Dim strResult        As String
  1083.    Dim strDisplay       As String
  1084.    Dim i                As Integer
  1085.    Dim Str1             As String
  1086.    intResult = 0
  1087.    strResult = ""
  1088.    strDisplay = ""
  1089.      
  1090.    Str1 = Text1.Text
  1091.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1092.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1093.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1094.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1095.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1096.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1097.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1098.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1099.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1100.    txt_Result = strDisplay
  1101.    'time the function
  1102.    Str1 = Text1.Text
  1103.    TimerHandle = cTimerOpen()
  1104.    TimerStartOk = cTimerStart(TimerHandle)
  1105.    For i = 1 To Iteration
  1106.       intResult = cCheckChars(Str1, "aZ")
  1107.    Next i
  1108.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1109.    TimerCloseOk = cTimerClose(TimerHandle)
  1110. End Sub
  1111. Private Sub TestFilterChars()
  1112.    Dim intResult        As Integer
  1113.    Dim strResult        As String
  1114.    Dim strDisplay       As String
  1115.    Dim i                As Integer
  1116.    Dim Str1             As String
  1117.    intResult = 0
  1118.    strResult = ""
  1119.    strDisplay = ""
  1120.      
  1121.    Str1 = Text1.Text
  1122.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1123.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1124.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1125.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1126.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1127.    txt_Result = strDisplay
  1128.    'time the function
  1129.    Str1 = Text1.Text
  1130.    TimerHandle = cTimerOpen()
  1131.    TimerStartOk = cTimerStart(TimerHandle)
  1132.    For i = 1 To Iteration
  1133.       strResult = cFilterChars(Str1, "B/")
  1134.    Next i
  1135.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1136.    TimerCloseOk = cTimerClose(TimerHandle)
  1137. End Sub
  1138. Private Sub TestFilterNotChars()
  1139.    Dim intResult        As Integer
  1140.    Dim strResult        As String
  1141.    Dim strDisplay       As String
  1142.    Dim i                As Integer
  1143.    Dim Str1             As String
  1144.    intResult = 0
  1145.    strResult = ""
  1146.    strDisplay = ""
  1147.      
  1148.    Str1 = Text1.Text
  1149.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1150.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1151.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1152.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1153.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1154.    txt_Result = strDisplay
  1155.    'time the function
  1156.    Str1 = Text1.Text
  1157.    TimerHandle = cTimerOpen()
  1158.    TimerStartOk = cTimerStart(TimerHandle)
  1159.    For i = 1 To Iteration
  1160.       strResult = cFilterNotChars(Str1, "B/")
  1161.    Next i
  1162.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1163.    TimerCloseOk = cTimerClose(TimerHandle)
  1164. End Sub
  1165. Private Sub TestFilterBlocks()
  1166.    Dim intResult        As Integer
  1167.    Dim strResult        As String
  1168.    Dim strDisplay       As String
  1169.    Dim i                As Integer
  1170.    Dim Str1             As String
  1171.    intResult = 0
  1172.    strResult = ""
  1173.    strDisplay = ""
  1174.      
  1175.    Str1 = Text1.Text
  1176.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1177.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1178.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1179.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1180.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1181.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1182.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1183.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1184.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1185.    txt_Result = strDisplay
  1186.    'time the function
  1187.    Str1 = Text1.Text
  1188.    TimerHandle = cTimerOpen()
  1189.    TimerStartOk = cTimerStart(TimerHandle)
  1190.    For i = 1 To Iteration
  1191.       strResult = cFilterBlocks(Str1, "BI")
  1192.    Next i
  1193.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1194.    TimerCloseOk = cTimerClose(TimerHandle)
  1195. End Sub
  1196. Private Sub TestResizeString()
  1197.    Dim intResult        As Integer
  1198.    Dim strResult        As String
  1199.    Dim strDisplay       As String
  1200.    Dim i                As Integer
  1201.    Dim Str1             As String
  1202.    intResult = 0
  1203.    strResult = ""
  1204.    strDisplay = ""
  1205.      
  1206.    Str1 = Text1.Text
  1207.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1208.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1209.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1210.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1211.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1212.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1213.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1214.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1215.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1216.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1217.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1218.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1219.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1220.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1221.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1222.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1223.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1224.    txt_Result = strDisplay
  1225.    'time the function
  1226.    Str1 = Text1.Text
  1227.    TimerHandle = cTimerOpen()
  1228.    TimerStartOk = cTimerStart(TimerHandle)
  1229.    For i = 1 To Iteration
  1230.       strResult = cResizeString(Str1, 5)
  1231.    Next i
  1232.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1233.    TimerCloseOk = cTimerClose(TimerHandle)
  1234. End Sub
  1235. Private Sub TestResizeStringAndFill()
  1236.    Dim intResult        As Integer
  1237.    Dim strResult        As String
  1238.    Dim strDisplay       As String
  1239.    Dim i                As Integer
  1240.    Dim Str1             As String
  1241.    intResult = 0
  1242.    strResult = ""
  1243.    strDisplay = ""
  1244.      
  1245.    Str1 = Text1.Text
  1246.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1247.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1248.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1249.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1250.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1251.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1252.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1253.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1254.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1255.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1256.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1257.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1258.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1259.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1260.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1261.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1262.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1263.    txt_Result = strDisplay
  1264.    'time the function
  1265.    Str1 = Text1.Text
  1266.    TimerHandle = cTimerOpen()
  1267.    TimerStartOk = cTimerStart(TimerHandle)
  1268.    For i = 1 To Iteration
  1269.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1270.    Next i
  1271.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1272.    TimerCloseOk = cTimerClose(TimerHandle)
  1273. End Sub
  1274. Private Sub TestCreateAndFill()
  1275.    Dim intResult        As Integer
  1276.    Dim strResult        As String
  1277.    Dim strDisplay       As String
  1278.    Dim i                As Integer
  1279.    Dim Str1             As String
  1280.    intResult = 0
  1281.    strResult = ""
  1282.    strDisplay = ""
  1283.      
  1284.    Str1 = Text1.Text
  1285.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1286.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1287.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1288.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1289.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1290.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1291.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1292.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1293.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1294.    txt_Result = strDisplay
  1295.    'time the function
  1296.    Str1 = Text1.Text
  1297.    TimerHandle = cTimerOpen()
  1298.    TimerStartOk = cTimerStart(TimerHandle)
  1299.    For i = 1 To Iteration
  1300.       strResult = cCreateAndFill(40, Str1)
  1301.    Next i
  1302.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1303.    TimerCloseOk = cTimerClose(TimerHandle)
  1304. End Sub
  1305. Private Sub TestFill()
  1306.    Dim intResult        As Integer
  1307.    Dim strResult        As String
  1308.    Dim strDisplay       As String
  1309.    Dim i                As Integer
  1310.    Dim Str1             As String
  1311.    intResult = 0
  1312.    strResult = ""
  1313.    strDisplay = ""
  1314.      
  1315.    Str1 = Text1.Text
  1316.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1317.    Call cFill(Str1, "*=")
  1318.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1319.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1320.    Call cFill(Str1, "=*=")
  1321.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1322.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1323.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1324.    Call cFill(Str1, "7516")
  1325.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1326.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1327.    Call cFill(Str1, "$61.00")
  1328.    strDisplay = strDisplay & "'" & Str1 & "'"
  1329.    txt_Result = strDisplay
  1330.    'time the function
  1331.    Str1 = Text1.Text
  1332.    TimerHandle = cTimerOpen()
  1333.    TimerStartOk = cTimerStart(TimerHandle)
  1334.    For i = 1 To Iteration
  1335.       Call cFill(Str1, "*=")
  1336.    Next i
  1337.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1338.    TimerCloseOk = cTimerClose(TimerHandle)
  1339. End Sub
  1340. Private Sub TestLrc()
  1341.    Dim intResult        As Integer
  1342.    Dim strResult        As String
  1343.    Dim strDisplay       As String
  1344.    Dim i                As Integer
  1345.    Dim Str1             As String
  1346.    intResult = 0
  1347.    strResult = ""
  1348.    strDisplay = ""
  1349.      
  1350.    Str1 = Text1.Text
  1351.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1352.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1353.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1354.    Str1 = Chr$(2) & "0a12721536"
  1355.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  1356.    txt_Result = strDisplay
  1357.    'time the function
  1358.    Str1 = Text1.Text
  1359.    TimerHandle = cTimerOpen()
  1360.    TimerStartOk = cTimerStart(TimerHandle)
  1361.    For i = 1 To Iteration
  1362.       strResult = cLrc(Str1)
  1363.    Next i
  1364.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1365.    TimerCloseOk = cTimerClose(TimerHandle)
  1366. End Sub
  1367. Private Sub TestCompress()
  1368.    Dim intResult        As Integer
  1369.    Dim strResult        As String
  1370.    Dim strDisplay       As String
  1371.    Dim i                As Integer
  1372.    Dim Str1             As String
  1373.    intResult = 0
  1374.    strResult = ""
  1375.    strDisplay = ""
  1376.      
  1377.    Str1 = Text1.Text
  1378.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1379.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1380.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1381.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1382.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1383.    Str1 = "A " & Chr$(9) & "BC  "
  1384.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1385.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1386.    txt_Result = strDisplay
  1387.    'time the function
  1388.    Str1 = Text1.Text
  1389.    TimerHandle = cTimerOpen()
  1390.    TimerStartOk = cTimerStart(TimerHandle)
  1391.    For i = 1 To Iteration
  1392.       strResult = cCompress(Str1)
  1393.    Next i
  1394.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1395.    TimerCloseOk = cTimerClose(TimerHandle)
  1396. End Sub
  1397. Public Sub TestCompressTab()
  1398.    Dim intResult        As Integer
  1399.    Dim strResult        As String
  1400.    Dim strDisplay       As String
  1401.    Dim i                As Integer
  1402.    Dim Str1             As String
  1403.    Dim Str2             As String
  1404.    Dim Str3             As String
  1405.    intResult = 0
  1406.    strResult = ""
  1407.    strDisplay = ""
  1408.      
  1409.    Str1 = "A      BC   DEF  GHIJ  "
  1410.    For i = 1 To 6
  1411.       Str2 = cCompressTab(Str1, i)
  1412.       Str3 = Str2
  1413.       Call cChangeChars(Str3, vbTab, "
  1414.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  1415.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  1416.    Next i
  1417.    txt_Result = strDisplay
  1418.    'time the function
  1419.    Str1 = Text1.Text
  1420.    TimerHandle = cTimerOpen()
  1421.    TimerStartOk = cTimerStart(TimerHandle)
  1422.    For i = 1 To Iteration
  1423.       strResult = cCompressTab(Str1, 3)
  1424.    Next i
  1425.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1426.    TimerCloseOk = cTimerClose(TimerHandle)
  1427. End Sub
  1428. Private Sub TestCompact()
  1429.    Dim intResult        As Integer
  1430.    Dim strResult        As String
  1431.    Dim strDisplay       As String
  1432.    Dim i                As Integer
  1433.    Dim Str1             As String
  1434.    Dim Str2             As String
  1435.    intResult = 0
  1436.    strResult = ""
  1437.    strDisplay = ""
  1438.      
  1439.    Str1 = "987654321"
  1440.    Str2 = cCompact(Str1)
  1441.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1442.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1443.    Str1 = "1234567890"
  1444.    Str2 = cCompact(Str1)
  1445.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1446.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1447.    Str1 = Text1.Text
  1448.    Str2 = cCompact(Str1)
  1449.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1450.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1451.    txt_Result = strDisplay
  1452.    'time the function
  1453.    Str1 = Text1.Text
  1454.    TimerHandle = cTimerOpen()
  1455.    TimerStartOk = cTimerStart(TimerHandle)
  1456.    For i = 1 To Iteration
  1457.       strResult = cCompact(Str1)
  1458.    Next i
  1459.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1460.    TimerCloseOk = cTimerClose(TimerHandle)
  1461. End Sub
  1462. Private Sub TestAlign()
  1463.    Dim intResult        As Integer
  1464.    Dim strResult        As String
  1465.    Dim strDisplay       As String
  1466.    Dim i                As Integer
  1467.    Dim Str1             As String
  1468.    Dim Str2             As String
  1469.    intResult = 0
  1470.    strResult = ""
  1471.    strDisplay = ""
  1472.      
  1473.    Str1 = "T2WIN-32"
  1474.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1475.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  1476.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1477.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  1478.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1479.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  1480.    Str1 = Text1.Text
  1481.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1482.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  1483.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1484.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  1485.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1486.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  1487.    txt_Result = strDisplay
  1488.    'time the function
  1489.    Str1 = Text1.Text
  1490.    TimerHandle = cTimerOpen()
  1491.    TimerStartOk = cTimerStart(TimerHandle)
  1492.    For i = 1 To Iteration
  1493.       strResult = cAlign(Str1, 1, 30)
  1494.    Next i
  1495.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1496.    TimerCloseOk = cTimerClose(TimerHandle)
  1497. End Sub
  1498. Private Sub TestProperName()
  1499.    Dim intResult        As Integer
  1500.    Dim strResult        As String
  1501.    Dim strDisplay       As String
  1502.    Dim i                As Integer
  1503.    Dim Str1             As String
  1504.    Dim Str2             As String
  1505.    intResult = 0
  1506.    strResult = ""
  1507.    strDisplay = ""
  1508.      
  1509.    Str1 = Text1.Text
  1510.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1511.    Str1 = "John fitz,jr"
  1512.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1513.    Str1 = "john Fitz, jr"
  1514.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1515.    Str1 = "macdonald"
  1516.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1517.    Str1 = "mac donald"
  1518.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  1519.                   
  1520.    txt_Result = strDisplay
  1521.    'time the function
  1522.    Str1 = Text1.Text
  1523.    TimerHandle = cTimerOpen()
  1524.    TimerStartOk = cTimerStart(TimerHandle)
  1525.    For i = 1 To Iteration
  1526.       strResult = cProperName(Str1)
  1527.    Next i
  1528.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1529.    TimerCloseOk = cTimerClose(TimerHandle)
  1530. End Sub
  1531. Private Sub TestProperName2()
  1532.    Dim intResult        As Integer
  1533.    Dim strResult        As String
  1534.    Dim strDisplay       As String
  1535.    Dim i                As Integer
  1536.    Dim Str1             As String
  1537.    Dim Str2             As String
  1538.    intResult = 0
  1539.    strResult = ""
  1540.    strDisplay = ""
  1541.      
  1542.    Str1 = Text1.Text
  1543.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1544.    Str1 = "JOHN FITZ,JR"
  1545.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1546.    Str1 = "john Fitz,jr"
  1547.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1548.    Str1 = "macdonald"
  1549.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1550.    Str1 = "mac donald"
  1551.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1552.    Str1 = "a.l. greene jr."
  1553.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1554.    Str1 = "shale and sandstone and till"
  1555.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1556.    Str1 = "a sandstone or a shale"
  1557.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1558.    Str1 = "RR2 BARRHEAD"
  1559.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  1560.    Str1 = "ANDY MACDONALD"
  1561.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  1562.                   
  1563.    txt_Result = strDisplay
  1564.    'time the function
  1565.    Str1 = Text1.Text
  1566.    TimerHandle = cTimerOpen()
  1567.    TimerStartOk = cTimerStart(TimerHandle)
  1568.    For i = 1 To Iteration
  1569.       strResult = cProperName2(Str1, "", 0)
  1570.    Next i
  1571.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1572.    TimerCloseOk = cTimerClose(TimerHandle)
  1573. End Sub
  1574. Private Sub TestStringSAR()
  1575.    Dim intResult        As Integer
  1576.    Dim strResult        As String
  1577.    Dim strDisplay       As String
  1578.    Dim i                As Integer
  1579.    Dim Str1             As String
  1580.    Dim Str2             As String
  1581.    intResult = 0
  1582.    strResult = ""
  1583.    strDisplay = ""
  1584.      
  1585.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  1586.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1587.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  1588.    strDisplay = strDisplay & "     in" & vbCrLf
  1589.    strDisplay = strDisplay & Str1 & vbCrLf
  1590.    strDisplay = strDisplay & "     is" & vbCrLf
  1591.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1592.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  1593.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  1594.    strDisplay = strDisplay & "     in" & vbCrLf
  1595.    strDisplay = strDisplay & Str1 & vbCrLf
  1596.    strDisplay = strDisplay & "     is" & vbCrLf
  1597.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1598.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  1599.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  1600.    strDisplay = strDisplay & "     in" & vbCrLf
  1601.    strDisplay = strDisplay & Str1 & vbCrLf
  1602.    strDisplay = strDisplay & "     is" & vbCrLf
  1603.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1604.    Str2 = cStringSAR(Str1, "I", "i", False)
  1605.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  1606.    strDisplay = strDisplay & "     in" & vbCrLf
  1607.    strDisplay = strDisplay & Str1 & vbCrLf
  1608.    strDisplay = strDisplay & "     is" & vbCrLf
  1609.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1610.    txt_Result = strDisplay
  1611.    'time the function
  1612.    Str1 = Text1.Text
  1613.    TimerHandle = cTimerOpen()
  1614.    TimerStartOk = cTimerStart(TimerHandle)
  1615.    For i = 1 To Iteration
  1616.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1617.    Next i
  1618.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1619.    TimerCloseOk = cTimerClose(TimerHandle)
  1620. End Sub
  1621. Private Sub TestToHexa()
  1622.    Dim intResult        As Integer
  1623.    Dim strResult        As String
  1624.    Dim strDisplay       As String
  1625.    Dim i                As Integer
  1626.    Dim Str1             As String
  1627.    Dim Str2             As String
  1628.    intResult = 0
  1629.    strResult = ""
  1630.    strDisplay = ""
  1631.    Str1 = Text1.Text
  1632.    Str2 = cToHexa(Str1)
  1633.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1634.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1635.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1636.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1637.    Str1 = "ABCDEFGH"
  1638.    Str2 = cToHexa(Str1)
  1639.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1640.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1641.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1642.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1643.    Str1 = "01234567890"
  1644.    Str2 = cToHexa(Str1)
  1645.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1646.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1647.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1648.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  1649.    txt_Result = strDisplay
  1650.    'time the function
  1651.    Str1 = Text1.Text
  1652.    TimerHandle = cTimerOpen()
  1653.    TimerStartOk = cTimerStart(TimerHandle)
  1654.    For i = 1 To Iteration
  1655.       strResult = cToHexa(Str1)
  1656.    Next i
  1657.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1658.    TimerCloseOk = cTimerClose(TimerHandle)
  1659. End Sub
  1660. Private Sub TestRomanArabic()
  1661.    Dim intResult        As Integer
  1662.    Dim strResult        As String
  1663.    Dim strDisplay       As String
  1664.    Dim i                As Integer
  1665.    Dim Str1             As String
  1666.    Dim Value            As Integer
  1667.    intResult = 0
  1668.    strResult = ""
  1669.    strDisplay = ""
  1670.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  1671.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1672.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  1673.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1674.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  1675.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1676.    Value = Year(Int(Now))
  1677.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1678.    Value = Year(Int(Now)) - 1
  1679.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1680.    Value = Year(Int(Now)) + 1
  1681.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1682.    txt_Result = strDisplay
  1683.    'time the function
  1684.    Str1 = Text1.Text
  1685.    TimerHandle = cTimerOpen()
  1686.    TimerStartOk = cTimerStart(TimerHandle)
  1687.    For i = 1 To Iteration
  1688.       strResult = cArabicToRoman(1996)
  1689.    Next i
  1690.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1691.    TimerCloseOk = cTimerClose(TimerHandle)
  1692. End Sub
  1693. Private Sub TestAsciiEbcdic()
  1694.    Dim intResult        As Integer
  1695.    Dim strResult        As String
  1696.    Dim strDisplay       As String
  1697.    Dim i                As Integer
  1698.    Dim Str1             As String
  1699.    Dim Str2             As String
  1700.    intResult = 0
  1701.    strResult = ""
  1702.    strDisplay = ""
  1703.    Str1 = Text1.Text
  1704.    Str2 = Str1
  1705.    Call cCnvASCIItoEBCDIC(Str2)
  1706.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1707.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1708.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1709.    Call cCnvEBCDICtoASCII(Str2)
  1710.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1711.    Str1 = "ABCDEFGH"
  1712.    Str2 = Str1
  1713.    Call cCnvASCIItoEBCDIC(Str2)
  1714.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1715.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1716.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1717.    Call cCnvEBCDICtoASCII(Str2)
  1718.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1719.    Str1 = "01234567890"
  1720.    Str2 = Str1
  1721.    Call cCnvASCIItoEBCDIC(Str2)
  1722.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1723.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1724.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1725.    Call cCnvEBCDICtoASCII(Str2)
  1726.    strDisplay = strDisplay & "'" & Str2 & "'"
  1727.    txt_Result = strDisplay
  1728.    'time the function
  1729.    Str1 = Text1.Text
  1730.    TimerHandle = cTimerOpen()
  1731.    TimerStartOk = cTimerStart(TimerHandle)
  1732.    For i = 1 To Iteration
  1733.       Call cCnvASCIItoEBCDIC(Str1)
  1734.    Next i
  1735.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1736.    TimerCloseOk = cTimerClose(TimerHandle)
  1737. End Sub
  1738. Private Sub TestPatternMatch()
  1739.    Dim intResult        As Integer
  1740.    Dim strResult        As String
  1741.    Dim strDisplay       As String
  1742.    Dim i                As Integer
  1743.    Dim Str1             As String
  1744.    Dim Str2             As String
  1745.    intResult = 0
  1746.    strResult = ""
  1747.    strDisplay = ""
  1748.    Str1 = "Under the blue sky, the sun lights"
  1749.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1750.    Str2 = "*"
  1751.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1752.    Str2 = "*??*???*?"
  1753.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1754.    Str2 = "*Under*"
  1755.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1756.    Str2 = "*sky*"
  1757.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1758.    Str2 = "*lights"
  1759.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1760.    Str2 = "??der*sky*ligh??*"
  1761.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1762.    Str2 = "Under?the * s??,*"
  1763.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1764.    Str2 = "*under*"
  1765.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1766.    Str2 = "Under*sun"
  1767.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1768.    Str2 = "Under t??e*"
  1769.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1770.    txt_Result = strDisplay
  1771.    'time the function
  1772.    Str2 = "Under?the * s??,*"
  1773.    TimerHandle = cTimerOpen()
  1774.    TimerStartOk = cTimerStart(TimerHandle)
  1775.    For i = 1 To Iteration
  1776.       intResult = cPatternMatch(Str1, Str2)
  1777.    Next i
  1778.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1779.    TimerCloseOk = cTimerClose(TimerHandle)
  1780. End Sub
  1781. Private Sub TestPatternExtMatch()
  1782.    Dim intResult        As Integer
  1783.    Dim strResult        As String
  1784.    Dim strDisplay       As String
  1785.    Dim i                As Integer
  1786.    Dim Str1             As String
  1787.    Dim Str2             As String
  1788.    intResult = 0
  1789.    strResult = ""
  1790.    strDisplay = ""
  1791.    Str1 = "Under the blue sky, the sun lights"
  1792.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1793.    Str2 = "*"
  1794.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1795.    Str2 = "*??*???*?"
  1796.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1797.    Str2 = "*Under*"
  1798.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1799.    Str2 = "*sky*"
  1800.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1801.    Str2 = "*lights"
  1802.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1803.    Str2 = "??der*sky*ligh??*"
  1804.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1805.    Str2 = "Under?the * s??,*"
  1806.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1807.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  1808.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1809.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  1810.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1811.    Str2 = "~55~6E*~73"
  1812.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1813.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  1814.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1815.    Str2 = "Under?the *'~72~73~74~75'"
  1816.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1817.    Str2 = "*under*"
  1818.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1819.    Str2 = "Under*sun"
  1820.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1821.    Str2 = "Under t??e*"
  1822.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1823.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  1824.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1825.    Str2 = "~55~6G*~73"
  1826.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1827.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  1828.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1829.    Str2 = "Under?the *'~72~53~74~75'"
  1830.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1831.    txt_Result = strDisplay
  1832.    'time the function
  1833.    Str2 = "Under?the * s??,*"
  1834.    TimerHandle = cTimerOpen()
  1835.    TimerStartOk = cTimerStart(TimerHandle)
  1836.    For i = 1 To Iteration
  1837.       intResult = cPatternExtMatch(Str1, Str2)
  1838.    Next i
  1839.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1840.    TimerCloseOk = cTimerClose(TimerHandle)
  1841. End Sub
  1842. Private Sub TestCheckNumericity()
  1843.    Dim intResult        As Integer
  1844.    Dim strResult        As String
  1845.    Dim strDisplay       As String
  1846.    Dim i                As Integer
  1847.    Dim Str1             As String
  1848.    intResult = 0
  1849.    strResult = ""
  1850.    strDisplay = ""
  1851.      
  1852.    Str1 = Text1.Text
  1853.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1854.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1855.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1856.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1857.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1858.    Str1 = "1234567890"
  1859.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1860.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1861.    Str1 = "-1234567890"
  1862.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1863.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1864.    Str1 = "+12345.67890"
  1865.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1866.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1867.    txt_Result = strDisplay
  1868.    'time the function
  1869.    Str1 = Text1.Text
  1870.    TimerHandle = cTimerOpen()
  1871.    TimerStartOk = cTimerStart(TimerHandle)
  1872.    For i = 1 To Iteration
  1873.       intResult = cCheckNumericity(Str1)
  1874.    Next i
  1875.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1876.    TimerCloseOk = cTimerClose(TimerHandle)
  1877. End Sub
  1878. Private Sub TestAlphaDigit()
  1879.    Dim intResult        As Integer
  1880.    Dim strResult        As String
  1881.    Dim strDisplay       As String
  1882.    Dim i                As Integer
  1883.    Dim Str1             As String
  1884.    intResult = 0
  1885.    strResult = ""
  1886.    strDisplay = ""
  1887.      
  1888.    Str1 = "1234567890"
  1889.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1890.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1891.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1892.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  1893.    Str1 = Text1.Text
  1894.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1895.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1896.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1897.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  1898.    txt_Result = strDisplay
  1899.    'time the function
  1900.    Str1 = Text1.Text
  1901.    TimerHandle = cTimerOpen()
  1902.    TimerStartOk = cTimerStart(TimerHandle)
  1903.    For i = 1 To Iteration
  1904.       intResult = cAddDigit(Str1)
  1905.    Next i
  1906.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1907.    TimerCloseOk = cTimerClose(TimerHandle)
  1908. End Sub
  1909. Private Sub TestH2X()
  1910.    Dim intResult        As Integer
  1911.    Dim strResult        As String
  1912.    Dim strDisplay       As String
  1913.    Dim i                As Integer
  1914.    Dim Str1             As String
  1915.    intResult = 0
  1916.    strResult = ""
  1917.    strDisplay = ""
  1918.      
  1919.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  1920.    Str1 = "0"
  1921.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1922.    Str1 = "1"
  1923.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1924.    Str1 = "A"
  1925.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1926.    Str1 = "A1"
  1927.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1928.    Str1 = "A1B"
  1929.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1930.    Str1 = "7FFF"
  1931.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1932.    Str1 = "A1B2"
  1933.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1934.    Str1 = "FFFF"
  1935.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  1936.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  1937.    Str1 = "0"
  1938.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1939.    Str1 = "1"
  1940.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1941.    Str1 = "A"
  1942.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1943.    Str1 = "A1"
  1944.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1945.    Str1 = "A1B"
  1946.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1947.    Str1 = "A1B2"
  1948.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1949.    Str1 = "7FFFFFFF"
  1950.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1951.    Str1 = "B2A1A1B2"
  1952.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1953.    Str1 = "FFFFFFFF"
  1954.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  1955.    txt_Result = strDisplay
  1956.    'time the function
  1957.    Str1 = Text1.Text
  1958.    TimerHandle = cTimerOpen()
  1959.    TimerStartOk = cTimerStart(TimerHandle)
  1960.    For i = 1 To Iteration
  1961.       intResult = cH2I(Str1)
  1962.    Next i
  1963.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1964.    TimerCloseOk = cTimerClose(TimerHandle)
  1965. End Sub
  1966. Private Sub TestSortStr()
  1967.    Dim intResult        As Integer
  1968.    Dim strResult        As String
  1969.    Dim strDisplay       As String
  1970.    Dim i                As Integer
  1971.    Dim Str1             As String
  1972.    intResult = 0
  1973.    strResult = ""
  1974.    strDisplay = ""
  1975.      
  1976.    Str1 = Text1.Text
  1977.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1978.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1979.    intResult = cSortStr(Str1, 20, 3)
  1980.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1981.    Str1 = "ABCBCABECAEB"
  1982.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1983.    intResult = cSortStr(Str1, 4, 3)
  1984.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf
  1985.    Str1 = Text1.Text
  1986.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1987.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1988.    intResult = cReverseSortStr(Str1, 20, 3)
  1989.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1990.    Str1 = "ABCBCABECAEB"
  1991.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1992.    intResult = cReverseSortStr(Str1, 4, 3)
  1993.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1994.    txt_Result = strDisplay
  1995.    'time the function
  1996.    Str1 = Text1.Text
  1997.    TimerHandle = cTimerOpen()
  1998.    TimerStartOk = cTimerStart(TimerHandle)
  1999.    For i = 1 To Iteration
  2000.       strResult = cSortStr(Str1, 4, 3)
  2001.    Next i
  2002.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2003.    TimerCloseOk = cTimerClose(TimerHandle)
  2004. End Sub
  2005. Private Sub TestMorse()
  2006.    Dim intResult        As Integer
  2007.    Dim strResult        As String
  2008.    Dim strDisplay       As String
  2009.    Dim i                As Integer
  2010.    Dim Str1             As String
  2011.    intResult = 0
  2012.    strResult = ""
  2013.    strDisplay = ""
  2014.      
  2015.    Str1 = Text1.Text
  2016.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2017.    Str1 = "SOS"
  2018.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2019.    Str1 = "T2WIN-32"
  2020.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2021.    Str1 = "Nothing can beat the fox"
  2022.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2023.    txt_Result = strDisplay
  2024.    'time the function
  2025.    Str1 = Text1.Text
  2026.    TimerHandle = cTimerOpen()
  2027.    TimerStartOk = cTimerStart(TimerHandle)
  2028.    For i = 1 To Iteration
  2029.       strResult = cMorse(Str1)
  2030.    Next i
  2031.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2032.    TimerCloseOk = cTimerClose(TimerHandle)
  2033. End Sub
  2034. Private Sub TestToZ9()
  2035.    Dim intResult        As Integer
  2036.    Dim strResult        As String
  2037.    Dim strDisplay       As String
  2038.    Dim i                As Integer
  2039.    Dim Str1             As String
  2040.    Dim Str2             As String
  2041.    intResult = 0
  2042.    strResult = ""
  2043.    strDisplay = ""
  2044.    Str1 = Text1.Text
  2045.    Str2 = cToZ9(Str1)
  2046.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2047.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2048.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2049.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  2050.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2051.    Str2 = cToZ9(Str1)
  2052.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2053.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2054.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2055.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  2056.    Str1 = "01234567890"
  2057.    Str2 = cToZ9(Str1)
  2058.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2059.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2060.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2061.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'"
  2062.    txt_Result = strDisplay
  2063.    'time the function
  2064.    Str1 = Text1.Text
  2065.    TimerHandle = cTimerOpen()
  2066.    TimerStartOk = cTimerStart(TimerHandle)
  2067.    For i = 1 To Iteration
  2068.       strResult = cToZ9(Str1)
  2069.    Next i
  2070.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2071.    TimerCloseOk = cTimerClose(TimerHandle)
  2072. End Sub
  2073.